import {ArkPagination} from "../../common-type/ark-pagination";

export interface ArkPaginationOptions extends ArkPagination {
  /** 每页数量改变事件。参数为改变后的每页数量 */
  onPageSizeChange?: (pageSize: number) => void;
  /** 每页数量改变之后 */
  afterPageSizeChange?: (pageSize: number) => void;

  /** 页码改变事件。参数为改变后的页码 */
  onPageNumberChange?: (pageNumber: number) => void;
  /** 页码改变之后 */
  afterPageNumberChange?: (pageNumber: number) => void;

  /** 分页组件v-bind指令参数 */
  attributes?: Record<string, any>;
  /** 分页组件v-on指令参数 */
  events?: Record<string, any>;
}

/** options默认值 */
const arkPaginationOptionsDefault: Partial<ArkPaginationOptions> = {
  total: 0,
  pageNumber: 1,
  onPageNumberChange: () => {
  },
  onPageSizeChange: () => {
  },
  attributes: {},
  events: {},
};
export default arkPaginationOptionsDefault